package com.itheima.demo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.nio.channels.ConnectionPendingException;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class JD implements function{
    private String name;
    private boolean status;
    @Override
    public void press() {
        System.out.println("当前"+name+"的状态为"+status);
        status=!status;
        System.out.println("操作成功!"+"当前"+name+"的状态为"+status);
    }
}
